-
Notifications
You must be signed in to change notification settings - Fork 223
feat(graphiql): add API version selector component #6581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(graphiql): add API version selector component #6581
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage report
Test suite run success3407 tests passing in 1393 suites. Report generated by 🧪jest coverage report action from ecb6ff8 |
106240c to
ece610f
Compare
fc285da to
9607030
Compare
ece610f to
b31bbbe
Compare
9607030 to
b09054f
Compare
b31bbbe to
4ff63c5
Compare
b09054f to
4af8d43
Compare
4ff63c5 to
47297ec
Compare
4af8d43 to
c2551ad
Compare
7b22de0 to
d2a007d
Compare
6dedd3f to
cc588d6
Compare
d2a007d to
f3f94ef
Compare
cc588d6 to
b5d1cb1
Compare
f3f94ef to
e4e87e9
Compare
b5d1cb1 to
b2f9616
Compare
e4e87e9 to
db5e515
Compare
b2f9616 to
b20c543
Compare
0cd0b46 to
45c17b5
Compare
7f1b051 to
ab008f1
Compare
45c17b5 to
d34bd65
Compare
Adds dropdown component for selecting Admin API version. - Add ApiVersionSelector component using Polaris Select - Support for version list and change callbacks - Include comprehensive tests (94 lines) All component tests pass
ab008f1 to
ecb6ff8
Compare
d34bd65 to
cb351dd
Compare
|
This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. |

WHY are these changes introduced?
This PR builds on the previous UI components by adding the API version selector, which allows users to switch between different Shopify Admin API versions. This is the fourth PR in the 8-PR migration stack.
Context: The GraphiQL console needs to support querying different versions of the Shopify Admin API (e.g.,
2024-10,2025-01,unstable). The current template-based implementation uses vanilla JavaScript event listeners and manual DOM manipulation to handle version changes. By creating a declarative React component, we can:WHAT is this pull request doing?
This PR adds a single, focused component for API version selection using Shopify Polaris's
Selectcomponent.Key Changes:
ApiVersionSelector Component (
src/components/ApiVersionSelector/):SelectcomponentvalueandonChangeaddEventListener('change')) and manual DOM manipulationProps Interface:
Usage Example:
Testing:
Files Added:
src/components/ApiVersionSelector/ApiVersionSelector.tsx- Component implementationsrc/components/ApiVersionSelector/ApiVersionSelector.test.tsx- 94 lines of testssrc/components/ApiVersionSelector/index.ts- Barrel exportDependencies
Builds on:
How to test your changes?
Manual Testing:
You can test the component in the App by simulating version changes:
Measuring impact
Checklist